<?php get_header(); ?>
<div id="content">
    <?php if (have_posts()) { ?>
        <?php the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
	      	<h1><?php the_title(); ?></h1>
	        	<div class="post-info">
	        	  <?php  $category = get_the_category();	   ?>
							<p>
								<a href="<?php bloginfo('siteurl') ?>/" alt="Tai game java mien phi">Home </a> » 
								<a href="<?php bloginfo('siteurl') ?>/<?php print $category[0]->slug; ?>"><?php print $category[0]->name; ?></a> » <?php the_title(); ?></p>
							<p>Lượt xem: <?php if(function_exists('the_views')) { the_views(); } ?></p>
	           </div>
	           <div class="entry">
						    <?php the_content(); ?>
										<center>
									    <a href="<?php print  get('link_download'); ?>">
									    	<img src="<?php bloginfo('template_directory') ?>/download.gif" alt="game java,tai game java" border="0">
									    </a>
									  </center>
									<br>
						    <?php link_pages('<p><code>Pages:</strong> ', '</p>', 'number'); ?>
	           </div><br>
        </div>
        <div id="related-posts">
					<p><?php the_tags('Tag: ', ','); ?></p><br>				
        </div>	
				<!--  List game hot-->
				<?php include (TEMPLATEPATH . '/game_hot.php'); ?>
        <!--  End list game host  -->		
<div id="nav">    
	<h4>Game Java Ngẫu Nhiên</h4>	
</div>    
<div id="related-posts">	        
		<ul>            
		<?php 
		 $randPosts = new WP_Query();
		 $randPosts->query('showposts=10&orderby=rand');
		   while($randPosts->have_posts()) :
		    $randPosts->the_post();	?>				
				<li class="n">
					<h5><a href="<?php the_permalink();?>">
							<img src="<?php bloginfo('template_directory') ?>/i.gif"><?php the_title();?></a> - <?php if(function_exists('the_views')) { the_views(); } ?>
					</h5>
				</li>            
		<?php endwhile; ?>
		</ul>
</div>
<?php }else { ?>
        <div class="post" id="notfound">
            <p>
                Không tìm thấy.
            </p>
        </div>
<?php } ?>
</div>
<?php get_footer(); ?>